package com.yorick.common.Result.SimpleFactory;

import com.yorick.common.Result.impl.Success;
import com.yorick.common.Result.ResultInterface;
import com.yorick.common.Result.impl.Failure;

/**
 * @author 陈治杰
 * @Title: ResultFactory
 * @Description:
 * @date 2019/1/215:24
 */
public class ResultFactory {

    public static ResultInterface success(Object obj){
        return new Success(obj);
    }
    public static ResultInterface success(){
        return new Success();
    }

    public static ResultInterface failure(){
        return new Failure();
    }
    public static ResultInterface failure(String flag, String msg, Object obj){
        return new Failure(flag,msg,obj);
    }
}
